<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OracleClient" %>
<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)	
Try
    ' If the connection string is null, use a default.
    If myConnection = "" Then
        myConnection = "Data Source=Oracle8i;"
        myConnection +="Integrated Security=yes"
    End If
    Dim myConn As New _
    OracleConnection(myConnection)
    Dim myInsertQuery As String 
    myInsertQuery = "INSERT INTO Dept "
    myInsertQuery +="(DeptNo, Dname, Loc) "
    myInsertQuery  +="values (50, 'TECHNOLOGY'"
   myInsertQuery  + =", 'DENVER')"
    Dim myOracleCommand As New _
 	OracleCommand(myInsertQuery)
    myOracleCommand.Connection = myConn
    myConn.Open()
    myOracleCommand.ExecuteNonQuery()
    myConn.Close()
Catch objError As Exception
	response.write("<b>* Error</b>: " & _
	objError.Message & "<p />")
End Try
End Sub
</script>	
